package com.example.demo.moduel.entity;

import java.io.Serializable;
import java.util.Date;

/**
 * Created By MBG-GUI-EXTENSION https://github.com/spawpaw/mybatis-generator-gui-extension
 * Description:
 * 
 *
 * @author 
 */
public class Order {
    /**
     *
     *
     * @mbg.generated Thu Apr 19 18:53:15 CST 2018
     */
    private Long id;

    /**
     *
     *
     * @mbg.generated Thu Apr 19 18:53:15 CST 2018
     */
    private String name;

    /**
     *
     *
     * @mbg.generated Thu Apr 19 18:53:15 CST 2018
     */
    private Double price;

    /**
     *
     *
     * @mbg.generated Thu Apr 19 18:53:15 CST 2018
     */
    private Date create_time;

    /**
     *
     * @mbg.generated Thu Apr 19 18:53:15 CST 2018
     */
    private static final long serialVersionUID = 1L;

    /**
     * This method returns the value of the database column t_order.id
     *
     * @return the value of t_order.id
     *
     * @mbg.generated Thu Apr 19 18:53:15 CST 2018
     */
    public Long getId() {
        return id;
    }

    /**
     *
     * @mbg.generated Thu Apr 19 18:53:15 CST 2018
     */
    public Order withId(Long id) {
        this.setId(id);
        return this;
    }

    /**
     * This method sets the value of the database column t_order.id
     *
     * @param id the value for t_order.id
     *
     * @mbg.generated Thu Apr 19 18:53:15 CST 2018
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * This method returns the value of the database column t_order.name
     *
     * @return the value of t_order.name
     *
     * @mbg.generated Thu Apr 19 18:53:15 CST 2018
     */
    public String getName() {
        return name;
    }

    /**
     *
     * @mbg.generated Thu Apr 19 18:53:15 CST 2018
     */
    public Order withName(String name) {
        this.setName(name);
        return this;
    }

    /**
     * This method sets the value of the database column t_order.name
     *
     * @param name the value for t_order.name
     *
     * @mbg.generated Thu Apr 19 18:53:15 CST 2018
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * This method returns the value of the database column t_order.price
     *
     * @return the value of t_order.price
     *
     * @mbg.generated Thu Apr 19 18:53:15 CST 2018
     */
    public Double getPrice() {
        return price;
    }

    /**
     *
     * @mbg.generated Thu Apr 19 18:53:15 CST 2018
     */
    public Order withPrice(Double price) {
        this.setPrice(price);
        return this;
    }

    /**
     * This method sets the value of the database column t_order.price
     *
     * @param price the value for t_order.price
     *
     * @mbg.generated Thu Apr 19 18:53:15 CST 2018
     */
    public void setPrice(Double price) {
        this.price = price;
    }

    /**
     * This method returns the value of the database column t_order.create_time
     *
     * @return the value of t_order.create_time
     *
     * @mbg.generated Thu Apr 19 18:53:15 CST 2018
     */
    public Date getCreate_time() {
        return create_time;
    }

    /**
     *
     * @mbg.generated Thu Apr 19 18:53:15 CST 2018
     */
    public Order withCreate_time(Date create_time) {
        this.setCreate_time(create_time);
        return this;
    }

    /**
     * This method sets the value of the database column t_order.create_time
     *
     * @param create_time the value for t_order.create_time
     *
     * @mbg.generated Thu Apr 19 18:53:15 CST 2018
     */
    public void setCreate_time(Date create_time) {
        this.create_time = create_time;
    }

    /**
     *
     * @mbg.generated Thu Apr 19 18:53:15 CST 2018
     */
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", name=").append(name);
        sb.append(", price=").append(price);
        sb.append(", create_time=").append(create_time);
        sb.append("]");
        return sb.toString();
    }

    /**
     *
     * @mbg.generated Thu Apr 19 18:53:15 CST 2018
     */
    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Order other = (Order) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
            && (this.getPrice() == null ? other.getPrice() == null : this.getPrice().equals(other.getPrice()))
            && (this.getCreate_time() == null ? other.getCreate_time() == null : this.getCreate_time().equals(other.getCreate_time()));
    }

    /**
     *
     * @mbg.generated Thu Apr 19 18:53:15 CST 2018
     */
    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getPrice() == null) ? 0 : getPrice().hashCode());
        result = prime * result + ((getCreate_time() == null) ? 0 : getCreate_time().hashCode());
        return result;
    }
}
